package cn.bat.slsystem.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.support.MultipartFilter;

import cn.bat.slsystem.dao.AuUserMapper;
import cn.bat.slsystem.pojo.AuUser;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	private AuUserMapper AuUserMapper;
	
	@Override
	public AuUser login(String name, String pwd) {
		
		return AuUserMapper.login(name, pwd);
	}

	@Override
	public int insert(AuUser auUser) {
		// TODO Auto-generated method stub
		return AuUserMapper.insert(auUser);
	}

	@Override
	public int updateByCode(String loginCode, String password) {
		// TODO Auto-generated method stub
		return AuUserMapper.updateByCode(loginCode, password);
	}

	@Override
	public List<AuUser> listAll(String name) {
		
		return AuUserMapper.listAll(name);
	}

	@Override
	public int updateById(AuUser user) {
		
		return AuUserMapper.updateById(user);
	}

	@Override
	public int updateAuthority(int id, int start) {
		// TODO Auto-generated method stub
		return AuUserMapper.updateAuthority(id, start);
	}

	@Override
	public AuUser serchById(int id) {
		// TODO Auto-generated method stub
		return AuUserMapper.serchById(id);
	}

	@Override
	public int delById(int id) {
		// TODO Auto-generated method stub
		return AuUserMapper.delById(id);
	}

	@Override
	public AuUser serchByName(String name) {
		// TODO Auto-generated method stub
		return AuUserMapper.serchByName(name);
	}

	@Override
	public List<AuUser> serchByReter(String reter) {
		// TODO Auto-generated method stub
		return AuUserMapper.serchByReter(reter);
	}

}
